package hdf5.gui.listeners;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class StopActionListener implements ActionListener {

    private Thread thread;

    public void setThread(Thread thread){
        this.thread = thread;
    }

    public void actionPerformed(ActionEvent e) {
        if(thread != null && thread.isAlive()){
            thread.interrupt();
        }
    }
}
